﻿@using ASoft.Base;
@{
    ViewBag.Title = "Detail";
    Layout = "~/Views/Shared/WapMain.cshtml";
    var room = ViewData["room"] as WebRoomData;
}
<style type="text/css">
    .grid-font-size {
        font-size: 12px;
    }
</style>
@if (room == null)
{
    <h2>无数据</h2>
    <button type="button" data-theme="b" onclick="history.back()">返回</button>
}
else
{
    <div data-role="header">
        <table style="width: 100%">
            <tr>
                <th style="width: 33%">
                    <button type="button" data-theme="b" onclick="window.location.reload()">刷新</button></th>
                <th style="width: 33%">@room.RoomName
                </th>
                <th style="width: 33%">
                    <button type="button" data-theme="b" onclick="history.back()">返回</button></th>
            </tr>
        </table>
    </div>
    <div class="ui-grid-a">
        <div class="ui-block-a">
            <div class="ui-bar ui-body-d grid-font-size">Id</div>
        </div>
        <div class="ui-block-b">
            <div class="ui-bar ui-bar-e grid-font-size">@room.Id</div>
        </div>
        <div class="ui-block-a">
            <div class="ui-bar ui-body-d grid-font-size">名称</div>
        </div>
        <div class="ui-block-b">
            <div class="ui-bar ui-bar-e grid-font-size">@room.RoomName</div>
        </div>

        @if (room.IsPhec)
        {
            <div class="ui-block-a">
                <div class="ui-bar ui-body-d grid-font-size">Ph</div>
            </div>
            <div class="ui-block-b">
                <div class="ui-bar ui-bar-e grid-font-size">@room.Ph
                </div>
            </div>
            <div class="ui-block-a">
                <div class="ui-bar ui-body-d grid-font-size">Ec</div>
            </div>
            <div class="ui-block-b">
                <div class="ui-bar ui-bar-e grid-font-size">@room.Ec</div>
            </div>
        }
        else
        {
            <div class="ui-block-a">
                <div class="ui-bar ui-body-d grid-font-size">室内温度1</div>
            </div>
            <div class="ui-block-b">
                <div class="ui-bar ui-bar-e grid-font-size">@room.室内温度1
                </div>
            </div>
            <div class="ui-block-a">
                <div class="ui-bar ui-body-d grid-font-size">室内温度2</div>
            </div>
            <div class="ui-block-b">
                <div class="ui-bar ui-bar-e grid-font-size">@room.室内温度2</div>
            </div>
            <div class="ui-block-a">
                <div class="ui-bar ui-body-d grid-font-size">湿度1</div>
            </div>
            <div class="ui-block-b">
                <div class="ui-bar ui-bar-e grid-font-size">@room.湿度1</div>
            </div>
            <div class="ui-block-a">
                <div class="ui-bar ui-body-d grid-font-size">湿度2</div>
            </div>
            <div class="ui-block-b">
                <div class="ui-bar ui-bar-e grid-font-size">@room.湿度2</div>
            </div>
            <div class="ui-block-a">
                <div class="ui-bar ui-body-d grid-font-size">室内光照</div>
            </div>
            <div class="ui-block-b">
                <div class="ui-bar ui-bar-e grid-font-size">@room.室内光照</div>
            </div>
            <div class="ui-block-a">
                <div class="ui-bar ui-body-d grid-font-size">室内CO2</div>
            </div>
            <div class="ui-block-b">
                <div class="ui-bar ui-bar-e grid-font-size">@room.室内CO2</div>
            </div>
            <div class="ui-block-a">
                <div class="ui-bar ui-body-d grid-font-size">土壤水分</div>
            </div>
            <div class="ui-block-b">
                <div class="ui-bar ui-bar-e grid-font-size">@room.土壤湿度</div>
            </div>
            <div class="ui-block-a">
                <div class="ui-bar ui-body-d grid-font-size">遮阳网位置</div>
            </div>
            <div class="ui-block-b">
                <div class="ui-bar ui-bar-e grid-font-size">@room.遮阳网位置</div>
            </div>
            <div class="ui-block-a">
                <div class="ui-bar ui-body-d grid-font-size">湿帘泵位置</div>
            </div>
            <div class="ui-block-b">
                <div class="ui-bar ui-bar-e grid-font-size">@room.湿帘泵位置</div>
            </div>
            <div class="ui-block-a">
                <div class="ui-bar ui-body-d grid-font-size">保温被位置</div>
            </div>
            <div class="ui-block-b">
                <div class="ui-bar ui-bar-e grid-font-size">@room.保温被位置</div>
            </div>
            <div class="ui-block-a">
                <div class="ui-bar ui-body-d grid-font-size">灌溉加湿</div>
            </div>
            <div class="ui-block-b">
                <div class="ui-bar ui-bar-e grid-font-size">@room.灌溉加湿</div>
            </div>
            <div class="ui-block-a">
                <div class="ui-bar ui-body-d grid-font-size">排风扇</div>
            </div>
            <div class="ui-block-b">
                <div class="ui-bar ui-bar-e grid-font-size">@room.排风扇</div>
            </div>
            <div class="ui-block-a">
                <div class="ui-bar ui-body-d grid-font-size">高温报警位</div>
            </div>
            <div class="ui-block-b">
                <div class="ui-bar ui-bar-e grid-font-size">@room.温室高温报警位</div>
            </div>
            <div class="ui-block-a">
                <div class="ui-bar ui-body-d grid-font-size">低温报警位</div>
            </div>
            <div class="ui-block-b">
                <div class="ui-bar ui-bar-e grid-font-size">@room.温室低温报警位</div>
            </div>
            <div class="ui-block-a">
                <div class="ui-bar ui-body-d grid-font-size">高湿报警位</div>
            </div>
            <div class="ui-block-b">
                <div class="ui-bar ui-bar-e grid-font-size">@room.温室高湿报警位</div>
            </div>
            <div class="ui-block-a">
                <div class="ui-bar ui-body-d grid-font-size">低湿报警位</div>
            </div>
            <div class="ui-block-b">
                <div class="ui-bar ui-bar-e grid-font-size">@room.温室低湿报警位</div>
            </div>
        }
    </div>     
    <div class="ui-grid-solo">
        <div class="ui-block-a">
            <div class="ui-bar ui-bar-a grid-font-size">@room.时间</div>
        </div>
    </div>
}
